package dapps.service.document;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springside.modules.orm.hibernate.EntityManager;

import dapps.dao.document.AttachmentDao;
import dapps.entity.document.Attachment;

/**

 */
@Service
//默认将类中的所有函数纳入事务管理.
@Transactional
public class AttachmentManager extends EntityManager<Attachment, Long> {
	@Autowired
	private AttachmentDao attachmentDao;


	@Override
	protected AttachmentDao getEntityDao() {
		return attachmentDao;
	}

	public List<Attachment> getFilesByDoc(Long docid) {
		return attachmentDao.getFilesByDoc(docid);
	}


}
